<?php

namespace frontendw\models;

/**
 * @author  shuang
 * @date    2017-2-11 20:02:56
 * @version V1.0
 * @desc    
 */
use common\models\TaskHidden;
use yii\behaviors\TimestampBehavior;
use yii\helpers\ArrayHelper;
class WB_TaskHidden extends TaskHidden {
    /*
     * 设置表操作行为动作
     * return array
     */

    public function behaviors() {
        return[
            [
                'class' => TimestampBehavior::className()
            ]
        ];
    }

    /*
     * 查询隐藏的任务
     */

    public static function getHiddenTask($userid) {
        $result = WB_TaskHidden::find()->where("userid=" . $userid)->select("taskid")->asArray()->all();
        return $result ? ArrayHelper::map($result, "taskid", "taskid") : [];
    }

}
